﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
dim rs
Set Rs = Server.CreateObject("Adodb.Recordset")
	dim urls,namer,zf,kongjiana,kongjian,xingbie,nianlin1,meili,tili,renqi,vip,diqu,monery,monery1,mark,touxian,vip1,doing,doingtime
        urls=Request.QueryString("urls")
        if urls="" then urls="index.asp"
		if sid<>"Null" then
                namer=session("username")
		Sql = "select [id],[zf],[kongjian],[xingbie],[nianlin],[touxian],[meili],[mark],[money],[money1],[tili],[renqi],[vip],[diqu],[bbs] from [qingtian_user] where sid='"&qingtian.Formatsid(sid)&"'"
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof)  then
                id1=rs("id")
                zf=rs("zf")
                kongjiana=rs("kongjian")
                xingbie=qingtian.utf8(rs("xingbie"))
                nianlin1=rs("nianlin")
                meili=rs("meili")
                mark=rs("mark")
                touxian=rs("touxian")
                tili=rs("tili")
                renqi=rs("renqi")
                vip=rs("vip")
                diqu=qingtian.utf8(rs("diqu"))
                monery=rs("money")
                monery1=rs("money1")
                bbs=rs("bbs")
if bbs then 
bbs="/[站长]"
else
bbs=""
end if

                end if
                Rs.close
set rs=nothing
	Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "select  [listid] from [qingtian_bbs_bz] where [del]=0 and [nid]="&id1&" order by [id] desc"
	Rs.Open Sql,conn,1,1
	if not (rs.bof and rs.eof) then
bbs=Replace(bbs,"/","")
bbs="/"&bbs&"[版主]"
else
bbs=bbs 
                end if
                Rs.close
set rs=nothing

zft=qingtian.jibie(zf)
select case v
case "0"
we0="<br/>"
hr="---------------<br/>"

%>
<card title="我的空间"><p align="<%=qingtian.px%>">
<%
case "1"
dim redd
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
redd="<div style=""background:rgb(256,256,200);color:#FF5500"">"
%>
<title>我的空间</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select
        qingtian.info
%>		
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
kongjian=qingtian.kongjian
if kongjian="ture" and kongjiana<>true then
%><%=we%>对不起你还没开通空间,开通空间需要<%=qingtian.bishu%><%=qingtian.bi%>,是否开通?<%=we0%><%=hr%><%=dao%><b><a href="kong.asp?sid=<%=sidd%>">开通</a>.<a href="index.asp?sid=<%=sidd%>">不开通</a></b><%=we0%>
<% 
   else
if vip=1 then vip1="<img src=""/img/vip.gif"" alt='VIP' noselect = ""true"" />"
%>
<%=dao%>
<%=namer%>(ID:<%=id1%>)<%=zft%>-<%=qingtian.onlina(id1)%>
<%=we0%><%=hr%>
<%=sou%>
我的空间|<a href="UserInfo.Asp?sid=<%=sidd%>">资料</a>|<a href="index.Asp?sid=<%=sidd%>">地盘</a><%=we0%><%=we%><%=vip1%><%=xingbie%>/<%=nianlin1%>岁/<%=diqu%><%=bbs%>
<%=we0%>
<%=we%>
<b>我的</b>:<a href="mytopic.Asp?sid=<%=sidd%>">帖子</a>.<a href="myvipic.Asp?sid=<%=sidd%>">回帖</a>.<a href="/riji/index.Asp?sid=<%=sidd%>">日记</a><br/><a href="/photo/index.Asp?sid=<%=sidd%>">相册</a>.<a href="fans.asp?sid=<%=sidd%>">好友</a>.<a href="myliuyan.asp?sid=<%=sidd%>">留言</a>.<a href="ininfo.asp?sid=<%=sidd%>">消息</a>
<%=we0%><%=qingtian.qingsav("302")%>
<%=sou%><img src="<%=touxian%>" alt='头像' noselect = "true" /><br/><span style="color:rgb(210,5,5)">个性签名:</span><%=qingtian.ubb2(mark)%><%=we0%>
<%=hr%>
<%=we%>
<a href="shangchen.asp?act=2&amp;sid=<%=sidd%>"><%=qingtian.bit%>(<%=monery1%>)</a><a href="shangchen.asp?act=1&amp;sid=<%=sidd%>"><%=qingtian.bi%>(<%=monery%>)</a><a href="mymeili.asp?sid=<%=sidd%>">魅力(<%=meili%>)</a><a href="mytili.asp?sid=<%=sidd%>">体力(<%=tili%>)</a><a href="myjifen.asp?sid=<%=sidd%>">积分(<%=zf%>)</a><a href="friendt.asp?act=7&amp;sid=<%=sidd%>">人气(<%=renqi%>)</a>
<%=we0%>
<%=dao%>【<a href="myliwu.Asp?sid=<%=sidd%>">收到的礼物</a>】<%=we0%><%=we%>
<%
Sql1 = "select top 3 [nameb],[toname],[toid],[bid],[topic],[tos] from [qingtian_daoju] where aid="&id1&" order by [id] desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then           
                  For i=1 to rs.RecordCount
%>
<a href="spacev.Asp?nid=<%=rs(3)%>&amp;sid=<%=sidd%>"><%=qingtian.utf8(rs(0))%>(ID:<%=rs(3)%>)</a>:送<img src="<%=rs(4)%>" alt='' noselect = "true" /><a href="viewdaoju.asp?nid=<%=rs(2)%>&amp;sid=<%=sidd%>"><%=qingtian.utf8(rs(1))%></a><%=rs(5)%>个<br/>           
<%   
                        Rs.MoveNext
		 	next
%>
<a href="myliwu.Asp?sid=<%=sidd%>">查看更多礼物</a><br/>
<%                
                else
%>
你没有收到任何礼物,看来你送礼还不够积极哦!<br/><a href="shangchen.asp?sid=<%=sidd%>">去商场逛逛</a><br/>
<% 		end if
			Rs.close
                       
Sql1 = "select top 3 [nameb],[bid],[bnei],[dotime] from [qingtian_qingshu] where aid="&id1&" order by [id] desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then

%><%=we1%><%=dao%>【<a href="myqingshu.Asp?sid=<%=sidd%>">收到的情书</a>】<%=we0%><%=we%>
<% 
                For i=1 to rs.RecordCount
                ne=rs("nameb")
                bidd=rs("bid")
                bnei=left(rs("bnei"),25)&"<a href='myqingshu.Asp?sid="&sidd&"'>...</a>"
                dotime=rs("dotime")
tmme="<a href=""spacev.Asp?nid="&bidd&"&amp;sid="&sidd&""">"&ne&"(ID:"&bidd&")</a>"
%>
<%=tmme%>:<%=bnei%>(<%=qingtian.datatime(now,dotime)%>前)<br/>            
<%   
                        Rs.MoveNext
		 	next
%>
<a href="myqingshu.Asp?sid=<%=sidd%>">查看更多情书</a><br/>
<%              
                else
%><%=we1%><%=dao%>【<a href="myqingshu.Asp?sid=<%=sidd%>">收到的情书</a>】<%=we0%><%=we%>
你没有收到任何情书,看来你的魅力还不够哦!<br/>
<% 		end if
			Rs.close
Sql1 = "select top 3 [nameb],[bid],[bnei],[dotime] from [qingtian_naonao] where aid="&id1&" order by [id] desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then

%><%=we1%><%=dao%>【<a href="mynaonao.Asp?sid=<%=sidd%>">收到的挠挠</a>】<%=we0%><%=we%>
<%
                  For i=1 to rs.RecordCount
                ne=rs("nameb")
                bidd=rs("bid")
                bnei=rs("bnei")
                dotime=rs("dotime")
tmme="<a href=""spacev.asp?nid="&bidd&"&amp;sid="&sidd&""">"&ne&"(ID:"&bidd&")</a>"
tmmr="你"
bnei=Replace(bnei, "B", ""&tmmr&"")
bnei=Replace(bnei, "A", ""&tmme&"")
%>
<%=bnei%>(<%=qingtian.datatime(now,dotime)%>前)<br/>            
<%   
                        Rs.MoveNext
		 	next
%><a href="znaonao.Asp?sid=<%=sidd%>">挠挠别人</a><br/><a href="mynaonao.Asp?sid=<%=sidd%>">查看更多挠挠</a><br/>
<%                
                else
%><%=we1%><%=dao%>【<a href="mynaonao.Asp?sid=<%=sidd%>">收到的挠挠</a>】<%=we0%><%=we%>
你还没有被任何人挠挠过,那就从<a href="znaonao.Asp?sid=<%=sidd%>">挠挠别人</a>开始吧!<br/>
<% 		end if
			Rs.close
                     

Sql1 = "select top 4 [nameb],[bid],[bnei] from [qingtian_kongjianly] where aid="&id1&" order by [id] desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then
%><%=we1%><%=dao%>【<a href="myliuyan.Asp?sid=<%=sidd%>">我的留言板</a>】<%=we0%><%=we%>
<%                
                  For i=1 to rs.RecordCount
%>
<a href="spacev.Asp?nid=<%=rs(1)%>&amp;sid=<%=sidd%>"><%=rs(0)%>(ID:<%=rs(1)%>)</a>:<%=qingtian.ubb(left(rs(2),35))%>...<br/>           
<%   
                        Rs.MoveNext
		 	next
%><a href="myliuyan.Asp?sid=<%=sidd%>">查看更多留言</a><br/>
<%               
                else
%><%=we1%><%=dao%>【<a href="myliuyan.Asp?sid=<%=sidd%>">我的留言板</a>】<%=we0%><%=we%>
没有人给你留言,要交朋友首先要学会主动哦!<br/>
<% 		end if
			Rs.close
                      
Sql1 = "select * from qingtian_fanke where aid="&id1&" and abs(DateDiff('d',dotime,now()))=0"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then
                a=rs.RecordCount
                else
                a=0
                end if
	        Rs.close
Sql1 = "select * from qingtian_fanke where aid="&id1&" and abs(DateDiff('d',dotime,now()))=1"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then
                b=rs.RecordCount
                else
                b=0
                end if
	        Rs.close
Sql1 = "select [nameb],[bid],[xinbie],[dotime] from [qingtian_fanke] where aid="&id1&" order by [id] desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then
%><%=we1%><%=dao%>【<a href="myfanke.Asp?sid=<%=sidd%>">最近的访客</a>】<%=we0%><%=we%>
<%                
                For i=1 to 4
		If Rs.Eof Then
			exit For
		End If
%>
<%=qingtian.utf8(rs(2))%>:<a href="spacev.Asp?nid=<%=rs(1)%>&amp;sid=<%=sidd%>"><%=qingtian.utf8(rs(0))%>(ID:<%=rs(1)%>)</a><%=qingtian.datatime(now,rs(3))%>前<br/>         
<%   
                        Rs.MoveNext
		 	next
%><a href="myfanke.Asp?sid=<%=sidd%>">共<%=rs.RecordCount%>人,昨<%=b%>人,今<%=a%>人</a><br/>
<%                
                else
%><%=we1%><%=dao%>【<a href="myfanke.Asp?sid=<%=sidd%>">最近的访客</a>】<%=we0%><%=we%>
最近还没有人到你空间逛过呢!<br/>
<% 		end if
			Rs.close
                                    

Sql1 = "select top 4 b.id,b.name,b.doing,b.doingtime from qingtian_fans a,qingtian_user b where a.fansid=b.id and a.nid=(select top 1 id from qingtian_user where sid='"&qingtian.Formatsid(sid)&"') order by b.doingtime desc"
		Rs.Open Sql1,conn,1,1
		if not (rs.bof and rs.eof) then
%><%=we1%><%=dao%>【<a href="myfdontai.Asp?sid=<%=sidd%>">好友的动态</a>】<%=we0%><%=we%>
<%               
                  For i=1 to rs.RecordCount
%>
<%=qingtian.datatime(now,rs(3))%>前<a href="spacev.Asp?nid=<%=rs(0)%>&amp;sid=<%=sidd%>"><%=rs(1)%>(ID:<%=rs(0)%>)</a><%=qingtian.ubb(rs(2))%><br/>         
<%   
                        Rs.MoveNext
		 	next
%><a href="myfdontai.Asp?sid=<%=sidd%>">更多好友动态</a><%=we0%>
<%               
                else
%><%=we1%><%=dao%>【<a href="myfdontai.Asp?sid=<%=sidd%>">好友的动态</a>】<%=we0%><%=we%>
暂无好友动态,你还没有添加任何好友哦!<%=we0%>
<% 		end if
			Rs.close
                        set rs=nothing                


end if
%>
<%=hr%><%=qingtian.qingsav("303")%>
<%=sou%><a href="index.asp?sid=<%=sidd%>">返回我的地盘</a><%=we0%>
<%
else
Response.Redirect "/login.asp?sid=" & sidd & "&url=/user/space.asp?sid="&sidd
end if

end Function
%>
